/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.abstractvoid.gui;

import java.util.TreeMap;
import pl.abstractvoid.datamodel.parameters.SingleParameter;

/**
 * Basically the same as the class it extends, but with non-editable cells.
 * Used to display output.
 * @author Ivo Zieliński
 */
public class NonEditableSingleParameterTableModel extends EditableSingleParameterTableModel {

    public NonEditableSingleParameterTableModel(TreeMap<String, SingleParameter> parameters) {
        super(parameters);
    }

    public NonEditableSingleParameterTableModel(SingleParameter[] singleParameters) {
        super(singleParameters);
    }
    
    @Override
    public boolean isCellEditable(int rowIndex, int columnIndex) {
        return false;
    }
    
    @Override
    public Object getValueAt(int row, int col) {
        return parameters.get(parameterNames[col]).getParameterValue();
    }
}
